package ch3.ex6;

import static ch3.print.Print.*;

public class RangeTest {
	static int test(int begin, int end, int testval){
		if(begin > end){
			print("end cannot be < begin.");
			return 0;
		}
		if((testval > begin - 1) && (testval < end + 1)){
			return +1;
		}
		if((testval < begin) || (testval > end)){
			return -1;
		}
		return 13;
	}

	public static void main(String[] args) {
		println(test(3,6,7));
		println(test(3,6,2));
		println(test(3,6,3));
		println(test(3,6,6));
		println(test(3,6,4));
		println(test(6,6,6));
		println(test(6,4,6));
	}
}
